﻿using System.Data;

using Microsoft.VisualStudio.TestTools.UnitTesting;

using PublicDomain.Data.Csv;
using PublicDomain.Data.Csv.Metadata;

namespace PublicDomain.UnitTest.Data.Csv.Metadata
{
    [TestClass]
    public class CsvColumnDefinitionTest
    {
        [TestMethod]
        [Description("Tests method CsvColumnSchema.ToString()")]
        public void ToStringTest()
        {
            var target = new CsvColumnDefinition
            {
                ColumnName = "Column00",
                ColumnOrdinal = 0,
                DataType = DbType.Decimal
            };

            var expected = "Column 'Column00'; position '0'; DbType 'Decimal'.";
            var actual = target.ToString();

            Assert.AreEqual(expected, actual);
        }
    }
}
